//
//  HBQTabBarButton.m
//  HelloBeeQuick
//
//  Created by LiYiLin on 16/8/18.
//  Copyright © 2016年 LiYiLin. All rights reserved.
//

#import "HBQTabBarButton.h"

#define kTabBarButtonWidth (KWIDTH / 4)

@implementation HBQTabBarButton

- (instancetype)initWithFrame:(CGRect)frame {

    if (self = [super initWithFrame:frame]) {
        [self setup_Button];
    }
    return self;
}


#pragma mark - 配置界面
- (void)setup_Button {

    self.imageView.contentMode = UIViewContentModeCenter;
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.font = [UIFont systemFontOfSize:12];
    [self setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    [self setTitleColor:KTHEMES forState:UIControlStateSelected];
}


#pragma mark - layoutSubviews
- (void)layoutSubviews {
    [super layoutSubviews];
    
    [self.imageView setFrame:CGRectMake(0, 5, kTabBarButtonWidth, 26)];
    [self.titleLabel setFrame:CGRectMake(0, 30, kTabBarButtonWidth, 18)];
}

@end











